package com.tiger.ejbql.sample2;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Sample2Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			Object obj = ctx.lookup("comp/env/ejb/EJBQLTest2Bean");
			EJBQLTest2Home testHome = (EJBQLTest2Home) PortableRemoteObject.narrow(obj, EJBQLTest2Home.class);
			EJBQLTest2 test = testHome.create();
			//test.createTestData();
			test.test();
			test.remove();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
